{{$token = $smarty.const.TOKEN}}
{{$controller = $smarty.const.CCTRL}}
<link rel="stylesheet" href="{{base_url()}}syslib/jqwidgets/styles/jqx.base.css" type="text/css" />
<script type="text/javascript" src="{{base_url()}}syslib/jqwidgets/jqxcore.js"></script>
<script type="text/javascript" src="{{base_url()}}syslib/jqwidgets/jqxtabs.js"></script>
<style>
    #tab{font-family: tahoma;font-size: 11px;}
</style>
<script type="text/javascript" charset="utf-8">
    $(document).ready(function(){
        var theme="classic";
        $('#tab').jqxTabs({ width:'auto', theme: theme ,keyboardNavigation: false});
         manu('classic-setting');
    });
    function S(_key,editor){
        var _value;
        if(editor==undefined)
            _value=$("#txt"+_key).val();
        else
            _value=$("#txt"+_key).getCode()
        updateCol("Value",_key,_value);
    }
    function manu(t){
        $(".OAumenu.active").removeClass("active");
        $(".OAumenu."+t).addClass("active");
        $(".manuoContent").hide();
        $(".manuoContent."+t).fadeIn(1000);
    }
    function updateCol(_col,_id,_value){
        try{
            var url,data;
            url="{{base_url()}}backend/fe548e5a964095e7c80cd8d3721be2ef/column_update/{{$token}}/{{$controller}}/"+_col;
            data={
                _id      :   _id,
                _value   :   _value
            }
            isrunning=true;
            myAjax(url,data,function(o){
                isrunning=false;
                if(o.result>=0){
                    uiMessage(o.message);
                }else{
                    uiMessage(o.message);
                    //ShowNoticeDialogMessage(result.msg);
                }
            });
        }catch(e){
            console.log("JSON Error:"+e.message+"\n↵ Error");
            uiMessage(e.message);
            //ShowErrorDialogMessage("Sorry. Your request could not be completed.<br/> Please check your input data.");
        }
    }
</script>
<div class="grid_x mr12 mb4" style="background-color: #EBEFF9;border: solid 1px #C9D7F1;">
    <div class="pt4 pl4 pr4 pb4">
        <div class="OAuths">
            <div class="OAumenu classic-setting" onclick="manu('classic-setting')">
                <div class="C1 pr20">
                    Basic Settings
                </div>
                <span class="C2"></span>
            </div>
            {{foreach $aSettings as $s}}
                {{if $s->Type=="html"}}
            <div class="OAumenu {{$s->Key|escape:'html'}}" onclick="manu('{{$s->Key|escape:'html'}}')">
                <div class="C1 pr20">
                    {{$s->Name|escape:'html'}}
                </div>
                <span class="C2"></span>
            </div>
                {{/if}} 
            {{/foreach}}
        </div>
    </div>
    <div class="clear"></div>
</div>